const RongIMLib = require('../../libs/RongIMLib-3.0.6-dev.js');

const Connection = require('./connection.js');
const Call = require('./call.js');

module.exports = ({ appkey, ms_url }) => {
  const im = RongIMLib.init({ appkey })
  return {
    Connection: Connection({ im }),
    Call: Call({
      im: RongIMLib,
      url: ms_url,
    }),
    ConversationType: RongIMLib.CONVERSATION_TYPE,
    MessageType: RongIMLib.CALL_MESSAGE_TYPE,
  };
};